<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>

<div class="modal-dialog ms-modal-dialog" style = "width:500px; margin-top: 100px;">
  <div class="modal-content">

    <div class="modal-header">
	    <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
	    <h4 class="modal-title">挂车类型及装载量-修改</h4>
    </div>

    <div class="modal-body">
	    <form class="form-horizontal ms-form modal-search-form" role="form" method="POST" action="${ctx.host}/suppliers/${supplierId}/trans-vehicle-stat" 
	          data-validate="true" data-anchor="#anchor-trasnport-resource">
	    
	      <input type="hidden" name="_method" value="PATCH" />
	      <input type="hidden" name="trailer" value="true" />
        <input type="hidden" name="id" value="${stat.id}" />
	     
	      <div class="form-group ms-form-group">
          <label class="control-label col-xs-5 ">&nbsp;<span class="color-red">*</span>挂车类型：</label>
          <div class="col-xs-6 pull-left">
            <p class="form-control-static">${trailerType.description}</p>
          </div>
	      </div>
	       
        <div class="form-group ms-form-group">
          <label class="control-label col-xs-5"><span class="color-red">*</span>1-2位（数量）：</label>
          <div class="col-xs-6 pull-left">
            <input type="text" name="capacityTypeOne" value="${stat.capacityTypeOne}" data-validate="required|number" class="form-control" placeholder="" tabindex="1" autocomplete="off"/>
          </div>
        </div>
        
        <div class="form-group ms-form-group">
          <label class="control-label col-xs-5"><span class="color-red">*</span>4位（数量）：</label>
          <div class="col-xs-6 pull-left">
            <input type="text" name="capacityTypeTwo" value="${stat.capacityTypeTwo}" data-validate="required|number" class="form-control" placeholder="" tabindex="1" autocomplete="off"/>
          </div>
        </div>
        
        <div class="form-group ms-form-group">
          <label class="control-label col-xs-5"><span class="color-red">*</span>6位（数量）：</label>
          <div class="col-xs-6 pull-left">
            <input type="text" name="capacityTypeThree" value="${stat.capacityTypeThree}" data-validate="required|number" class="form-control" placeholder="" tabindex="1" autocomplete="off"/>
          </div>
        </div>
        
        <div class="form-group ms-form-group">
          <label class="control-label col-xs-5"><span class="color-red">*</span>8位（数量）：</label>
          <div class="col-xs-6 pull-left">
            <input type="text" name="capacityTypeFour" value="${stat.capacityTypeFour}" data-validate="required|number" class="form-control" placeholder="" tabindex="1" autocomplete="off"/>
          </div>
        </div>
        
        <div class="form-group ms-form-group">
          <label class="control-label col-xs-5"><span class="color-red">*</span>10位（数量）：</label>
          <div class="col-xs-6 pull-left">
            <input type="text" name="capacityTypeFive" value="${stat.capacityTypeFive}" data-validate="required|number" class="form-control" placeholder="" tabindex="1" autocomplete="off"/>
          </div>
        </div>
        
        <div class="form-group ms-form-group">
          <label class="control-label col-xs-5"><span class="color-red">*</span>12位（数量）：</label>
          <div class="col-xs-6 pull-left">
            <input type="text" name="capacityTypeSix" value="${stat.capacityTypeSix}" data-validate="required|number" class="form-control" placeholder="" tabindex="1" autocomplete="off"/>
          </div>
        </div>
        
        <div class="form-group ms-form-group">
          <label class="control-label col-xs-5"><span class="color-red">*</span>14位（数量）：</label>
          <div class="col-xs-6 pull-left">
            <input type="text" name="capacityTypeSeven" value="${stat.capacityTypeSeven}" data-validate="required|number" class="form-control" placeholder="" tabindex="1" autocomplete="off"/>
          </div>
        </div>
        
        <div class="form-group ms-form-group">
          <label class="control-label col-xs-5"><span class="color-red">*</span>18位（数量）：</label>
          <div class="col-xs-6 pull-left">
            <input type="text" name="capacityTypeEight" value="${stat.capacityTypeEight}" data-validate="required|number" class="form-control" placeholder="" tabindex="1" autocomplete="off"/>
          </div>
        </div>
        
        <div class="form-group ms-form-group">
          <label class="control-label col-xs-5"><span class="color-red">*</span>21位（数量）：</label>
          <div class="col-xs-6 pull-left">
            <input type="text" name="capacityTypeNine" value="${stat.capacityTypeNine}" data-validate="required|number" class="form-control" placeholder="" tabindex="1" autocomplete="off"/>
          </div>
        </div>
        
        <div class="form-group ms-form-group">
          <label class="control-label col-xs-5"><span class="color-red">*</span>其他位（数量）：</label>
          <div class="col-xs-6 pull-left">
            <input type="text" name="capacityTypeOther" value="${stat.capacityTypeOther}" data-validate="required|number" class="form-control" placeholder="" tabindex="1" autocomplete="off"/>
          </div>
        </div>
	    
		    <div class="modal-footer ms-modal-footer">
		      <button type="submit" class="btn ms-btn btn-primary">确定</button>
		      <button type="button" class="btn ms-btn ms-btn-gary" data-dismiss="modal">取消</button>
		    </div>
	
	    </form>
    </div>
  </div>
</div>

<script type="text/javascript">
  $(document).ready(function () {

    $('select[name="transType"]').select2({
      theme: "classic",
      placeholder: '请选择',
      minimumResultsForSearch: -1,
      allowClear: true,
    });
    
    $('.date').datetimepicker({
      format: 'yyyy-mm-dd',
      autoclose: true,
      language: 'zh-CN',
      todayBtn: 'linked',
      startDate: '${today}',
      todayHighlight: true,
      pickerPosition: 'bottom-right',
      minView: 'month'
    });

  })
</script>
